﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using LanceZhang.Research.BLL;
using LanceZhang.Research.Model;

public partial class UserControl_BookParticular : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.QueryString["id"] != null)
        {
            TBL_Book bc = new TBL_Book();
            TBL_BookModel b = bc.GetModelByCache(Request.QueryString["id"]);

            lblName.Text = b.BookName;
            lblISSN.Text = b.ISBN;
            liAbstract.Text = b.Abstract;
            liContent.Text = b.Content;

            lblDate.Text = b.PubDate.ToShortDateString();
            hlview.Target = "_blank";
            hlview.NavigateUrl = "~/MyHonour.aspx?pid=" + b.ProjectID;

            lblPublisher.Text = b.Publisher;

            TBL_User uc = new TBL_User();
            BulletedList1.DataSource = uc.GetList(" UserID in (Select UserID from TBL_ProjectMember where ProjectID='" + b.ProjectID + "')");
            BulletedList1.DataTextField = "UserName";
            BulletedList1.DataValueField = "UserID";
            BulletedList1.DataBind();
        }
    }
}
